package edu.towson.greenteam.command;

import edu.towson.greenteam.InformationAggregator;
import edu.towson.greenteam.menu.Category;
import edu.towson.greenteam.menu.MenuItem;
import edu.towson.greenteam.menu.Price;

public class CMDAddMenuItem implements Command {
	
	InformationAggregator ia;
	MenuItem mi;
	
	public CMDAddMenuItem(InformationAggregator ia, String name, String description,
			float price, int maxQty, Category category, int prepTime) {
		this.ia = ia;
		this.mi = new MenuItem(name, description, new Price(price), maxQty, category,
				prepTime);
	}

	@Override
	public Object execute() {
		return (ia.getMenu().add(mi));
	}

}
